#include "ros/ros.h"
#include "learning_communication/num.h"
#include <sstream>

int main(int argc, char **argv)
{
  ros::init(argc, argv, "my_talker");
  ros::NodeHandle n;
  ros::Publisher chatter_pub = n.advertise<learning_communication::num>("my_chatter", 1000);
  ros::Rate loop_rate(10);

  int count = 0;
  while (ros::ok())
  {
    learning_communication::num msg;
    std::stringstream ss;
    ss << "number 1 " << count;
    msg.head = ss.str();
    ROS_INFO("%s", msg.head.c_str());
    msg.a = 1;
    msg.b = 2;
    msg.c = 3;
    chatter_pub.publish(msg);
    ros::spinOnce();
    loop_rate.sleep();
    ++count;
  }

  return 0;
}